package com.nchu.commondevelopmentframework.converter;

import com.nchu.commondevelopmentframework.entity.Menu;
import com.nchu.commondevelopmentframework.vo.MenuPermsIdNameVO;
import com.nchu.commondevelopmentframework.vo.UserMenuVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @className: MenuConverter
 * @description: TODO 类描述
 * @author: Li Chuanwei
 * @date: 2024/02/23 13:38
 * @Company: Copyright [日期] by [作者或个人]
 **/
@Mapper
public interface MenuConverter {
    MenuConverter INSTANCE = Mappers.getMapper(MenuConverter.class);

    UserMenuVO menuToUserMenuVO(Menu menu);

    List<UserMenuVO> menusToUserMenuVOs(List<Menu> menus);

    MenuPermsIdNameVO menuToMenuPermsIdNameVO(Menu menu);

    List<MenuPermsIdNameVO> menusToMenuPermsIdNameVOs(List<Menu> menus);
}
